﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace App
{
    public partial class formConfiguracao : Form
    {
        public formConfiguracao()
        {
            InitializeComponent();
        }

        private void btConfigCancelar_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void formConfiguracao_Load(object sender, EventArgs e)
        {
            //seta configuracoes do arquivo de propriedades
            this.numQntAnzois.Value = Properties.Settings.Default.qntAnzois;
            this.numQntBoiasRadio.Value = Properties.Settings.Default.qntSambura;
            this.numTmpLancamento.Value = Properties.Settings.Default.tmpLancamento;
        }

        private void btConfigSalvar_Click(object sender, EventArgs e)
        {
            //Properties.Settings.Default.tmpLancamento = this.numTmpLancamento.Value;
            Properties.Settings.Default.qntSambura = this.numQntBoiasRadio.Value;
            Properties.Settings.Default.qntAnzois = this.numQntAnzois.Value;
            Properties.Settings.Default.Save();
            MessageBox.Show("Configurações salvas com sucesso.");
            this.Close();
        }
    }
}
